﻿using System;
using System.Collections.Generic;
using System.Linq;
using Helpers;
using TaleWorlds.CampaignSystem.Actions;
using TaleWorlds.CampaignSystem.CharacterDevelopment;
using TaleWorlds.CampaignSystem.Conversation;
using TaleWorlds.CampaignSystem.GameMenus;
using TaleWorlds.CampaignSystem.GameState;
using TaleWorlds.CampaignSystem.Party;
using TaleWorlds.CampaignSystem.Roster;
using TaleWorlds.CampaignSystem.Settlements;
using TaleWorlds.Core;
using TaleWorlds.Library;
using TaleWorlds.Localization;
using TaleWorlds.SaveSystem;

namespace TaleWorlds.CampaignSystem.Issues
{
	// Token: 0x020002FD RID: 765
	public class ArtisanCantSellProductsAtAFairPriceIssueBehavior : CampaignBehaviorBase
	{
		// Token: 0x06002CCE RID: 11470 RVA: 0x000BBF71 File Offset: 0x000BA171
		public override void RegisterEvents()
		{
			CampaignEvents.OnCheckForIssueEvent.AddNonSerializedListener(this, new Action<Hero>(this.OnCheckForIssue));
		}

		// Token: 0x06002CCF RID: 11471 RVA: 0x000BBF8C File Offset: 0x000BA18C
		public void OnCheckForIssue(Hero hero)
		{
			if (this.ConditionsHold(hero))
			{
				Campaign.Current.IssueManager.AddPotentialIssueData(hero, new PotentialIssueData(new PotentialIssueData.StartIssueDelegate(this.OnStartIssue), typeof(ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue), IssueBase.IssueFrequency.Common, null));
				return;
			}
			Campaign.Current.IssueManager.AddPotentialIssueData(hero, new PotentialIssueData(typeof(ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue), IssueBase.IssueFrequency.Common));
		}

		// Token: 0x06002CD0 RID: 11472 RVA: 0x000BBFF0 File Offset: 0x000BA1F0
		private bool ConditionsHold(Hero issueGiver)
		{
			return issueGiver.IsArtisan && ArtisanCantSellProductsAtAFairPriceIssueBehavior.SelectCounterOfferHero(issueGiver) != null && ArtisanCantSellProductsAtAFairPriceIssueBehavior.SelectTargetSettlement(issueGiver) != null;
		}

		// Token: 0x06002CD1 RID: 11473 RVA: 0x000BC010 File Offset: 0x000BA210
		private static Hero SelectCounterOfferHero(Hero issueGiver)
		{
			return issueGiver.CurrentSettlement.Notables.FirstOrDefault((Hero x) => x.CharacterObject.IsHero && x.CanHaveQuestsOrIssues() && x.CharacterObject.HeroObject != issueGiver && x.CharacterObject.HeroObject.IsMerchant);
		}

		// Token: 0x06002CD2 RID: 11474 RVA: 0x000BC04B File Offset: 0x000BA24B
		private static Settlement SelectTargetSettlement(Hero issueGiver)
		{
			Settlement issueSettlement = issueGiver.CurrentSettlement;
			return SettlementHelper.FindRandomSettlement(delegate(Settlement x)
			{
				if (x.IsTown && x != issueSettlement)
				{
					if (x.Notables.Any((Hero y) => y.CanHaveQuestsOrIssues()))
					{
						float num;
						return Campaign.Current.Models.MapDistanceModel.GetDistance(x, issueSettlement, 150f, out num);
					}
				}
				return false;
			});
		}

		// Token: 0x06002CD3 RID: 11475 RVA: 0x000BC06E File Offset: 0x000BA26E
		private IssueBase OnStartIssue(in PotentialIssueData pid, Hero issueOwner)
		{
			return new ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue(issueOwner);
		}

		// Token: 0x06002CD4 RID: 11476 RVA: 0x000BC076 File Offset: 0x000BA276
		public override void SyncData(IDataStore dataStore)
		{
		}

		// Token: 0x04000D70 RID: 3440
		private const float MaxDistanceForSettlementSelection = 150f;

		// Token: 0x04000D71 RID: 3441
		private const IssueBase.IssueFrequency ArtisanCantSellProductsAtAFairPriceIssueFrequency = IssueBase.IssueFrequency.Common;

		// Token: 0x020005FE RID: 1534
		public class ArtisanCantSellProductsAtAFairPriceIssue : IssueBase
		{
			// Token: 0x0600483A RID: 18490 RVA: 0x0014F6E4 File Offset: 0x0014D8E4
			internal static void AutoGeneratedStaticCollectObjectsArtisanCantSellProductsAtAFairPriceIssue(object o, List<object> collectedObjects)
			{
				((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
			}

			// Token: 0x0600483B RID: 18491 RVA: 0x0014F6F2 File Offset: 0x0014D8F2
			protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
			{
				base.AutoGeneratedInstanceCollectObjects(collectedObjects);
				collectedObjects.Add(this._rawMaterialsToBeDelivered);
				collectedObjects.Add(this._targetSettlement);
				collectedObjects.Add(this._targetHero);
				collectedObjects.Add(this.CounterOfferHero);
			}

			// Token: 0x0600483C RID: 18492 RVA: 0x0014F72B File Offset: 0x0014D92B
			internal static object AutoGeneratedGetMemberValueCounterOfferHero(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue)o).CounterOfferHero;
			}

			// Token: 0x0600483D RID: 18493 RVA: 0x0014F738 File Offset: 0x0014D938
			internal static object AutoGeneratedGetMemberValue_rawMaterialsToBeDelivered(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue)o)._rawMaterialsToBeDelivered;
			}

			// Token: 0x0600483E RID: 18494 RVA: 0x0014F745 File Offset: 0x0014D945
			internal static object AutoGeneratedGetMemberValue_targetSettlement(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue)o)._targetSettlement;
			}

			// Token: 0x0600483F RID: 18495 RVA: 0x0014F752 File Offset: 0x0014D952
			internal static object AutoGeneratedGetMemberValue_targetHero(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue)o)._targetHero;
			}

			// Token: 0x17000E23 RID: 3619
			// (get) Token: 0x06004840 RID: 18496 RVA: 0x0014F75F File Offset: 0x0014D95F
			public override IssueBase.AlternativeSolutionScaleFlag AlternativeSolutionScaleFlags
			{
				get
				{
					return IssueBase.AlternativeSolutionScaleFlag.Duration;
				}
			}

			// Token: 0x17000E24 RID: 3620
			// (get) Token: 0x06004841 RID: 18497 RVA: 0x0014F762 File Offset: 0x0014D962
			// (set) Token: 0x06004842 RID: 18498 RVA: 0x0014F76A File Offset: 0x0014D96A
			[SaveableProperty(30)]
			public override Hero CounterOfferHero { get; protected set; }

			// Token: 0x17000E25 RID: 3621
			// (get) Token: 0x06004843 RID: 18499 RVA: 0x0014F773 File Offset: 0x0014D973
			private int RawMaterialCountToBeDelivered
			{
				get
				{
					return (int)(60f * base.IssueDifficultyMultiplier);
				}
			}

			// Token: 0x17000E26 RID: 3622
			// (get) Token: 0x06004844 RID: 18500 RVA: 0x0014F782 File Offset: 0x0014D982
			public override int AlternativeSolutionBaseNeededMenCount
			{
				get
				{
					return 3 + MathF.Ceiling(6f * base.IssueDifficultyMultiplier);
				}
			}

			// Token: 0x17000E27 RID: 3623
			// (get) Token: 0x06004845 RID: 18501 RVA: 0x0014F797 File Offset: 0x0014D997
			protected override int AlternativeSolutionBaseDurationInDaysInternal
			{
				get
				{
					return 3 + MathF.Ceiling(5f * base.IssueDifficultyMultiplier);
				}
			}

			// Token: 0x17000E28 RID: 3624
			// (get) Token: 0x06004846 RID: 18502 RVA: 0x0014F7AC File Offset: 0x0014D9AC
			protected override int RewardGold
			{
				get
				{
					return (int)(500f + 1500f * base.IssueDifficultyMultiplier);
				}
			}

			// Token: 0x17000E29 RID: 3625
			// (get) Token: 0x06004847 RID: 18503 RVA: 0x0014F7C1 File Offset: 0x0014D9C1
			public override int NeededInfluenceForLordSolution
			{
				get
				{
					return 10 + MathF.Round(40f * base.IssueDifficultyMultiplier);
				}
			}

			// Token: 0x17000E2A RID: 3626
			// (get) Token: 0x06004848 RID: 18504 RVA: 0x0014F7D8 File Offset: 0x0014D9D8
			protected override TextObject AlternativeSolutionStartLog
			{
				get
				{
					TextObject textObject = new TextObject("{=4M6jlZVa}{ISSUE_GIVER.LINK} an artisan from {ISSUE_GIVER_SETTLEMENT} has complained to you about not being able to sell their goods at the price they want because of local laws. {?ISSUE_GIVER.GENDER}She{?}He{\\?} will pay {REWARD}{GOLD_ICON} for you to take the goods to another town. You have tasked {COMPANION.LINK} and {ALTERNATIVE_SOLUTION_TROOP_COUNT} men to smuggle {?ISSUE_GIVER.GENDER}her{?}his{\\?} goods to a “friend” in {TARGET_TOWN}. They will return to you in {RETURN_DAYS} days with a sizable sum of {REWARD}{GOLD_ICON}.", null);
					StringHelpers.SetCharacterProperties("ISSUE_GIVER", base.IssueOwner.CharacterObject, textObject, false);
					StringHelpers.SetCharacterProperties("COMPANION", base.AlternativeSolutionHero.CharacterObject, textObject, false);
					textObject.SetTextVariable("ISSUE_GIVER_SETTLEMENT", base.IssueOwner.CurrentSettlement.EncyclopediaLinkWithName);
					textObject.SetTextVariable("TARGET_TOWN", this._targetSettlement.EncyclopediaLinkWithName);
					textObject.SetTextVariable("ALTERNATIVE_SOLUTION_TROOP_COUNT", this.AlternativeSolutionSentTroops.TotalManCount - 1);
					textObject.SetTextVariable("RETURN_DAYS", base.GetTotalAlternativeSolutionDurationInDays());
					textObject.SetTextVariable("REWARD", this.RewardGold);
					textObject.SetTextVariable("GOLD_ICON", "{=!}<img src=\"General\\Icons\\Coin@2x\" extend=\"8\">");
					return textObject;
				}
			}

			// Token: 0x17000E2B RID: 3627
			// (get) Token: 0x06004849 RID: 18505 RVA: 0x0014F8A3 File Offset: 0x0014DAA3
			protected override int CompanionSkillRewardXP
			{
				get
				{
					return (int)(400f + 1700f * base.IssueDifficultyMultiplier);
				}
			}

			// Token: 0x17000E2C RID: 3628
			// (get) Token: 0x0600484A RID: 18506 RVA: 0x0014F8B8 File Offset: 0x0014DAB8
			public override bool IsThereAlternativeSolution
			{
				get
				{
					return true;
				}
			}

			// Token: 0x17000E2D RID: 3629
			// (get) Token: 0x0600484B RID: 18507 RVA: 0x0014F8BB File Offset: 0x0014DABB
			public override bool IsThereLordSolution
			{
				get
				{
					return true;
				}
			}

			// Token: 0x17000E2E RID: 3630
			// (get) Token: 0x0600484C RID: 18508 RVA: 0x0014F8BE File Offset: 0x0014DABE
			public override TextObject IssueBriefByIssueGiver
			{
				get
				{
					return new TextObject("{=Vg7Ftrdl}You might say that... I work from dawn to late into the night but even so I can barely put bread on the table. Why's that? Because I can't sell my product at a fair price. The law says that I can only sell to local merchants, and at a fixed rate too, so that even when other prices are high I'm still making the same.[if:convo_annoyed]", null);
				}
			}

			// Token: 0x17000E2F RID: 3631
			// (get) Token: 0x0600484D RID: 18509 RVA: 0x0014F8CB File Offset: 0x0014DACB
			public override TextObject IssueAcceptByPlayer
			{
				get
				{
					return new TextObject("{=ioF9aJBJ}How can I help?", null);
				}
			}

			// Token: 0x17000E30 RID: 3632
			// (get) Token: 0x0600484E RID: 18510 RVA: 0x0014F8D8 File Offset: 0x0014DAD8
			public override TextObject IssueQuestSolutionExplanationByIssueGiver
			{
				get
				{
					TextObject textObject = new TextObject("{=bOyjQ4yr}If you can deliver {REQUESTED_AMOUNT} {.%}{?(REQUESTED_AMOUNT > 1)}{PLURAL(RAW_MATERIALS)}{?}{RAW_MATERIALS}{\\?}{.%} to my contact {TARGET_HERO.LINK}, who you can find in {TARGET_SETTLEMENT}, that would help me survive for a time. The merchants of the town could be furious and lodge legal complaints of course, but hopefully you won't have to deal with that part.", null);
					StringHelpers.SetCharacterProperties("TARGET_HERO", this._targetHero.CharacterObject, textObject, false);
					textObject.SetTextVariable("REQUESTED_AMOUNT", this.RawMaterialCountToBeDelivered);
					textObject.SetTextVariable("RAW_MATERIALS", this._rawMaterialsToBeDelivered.Name);
					textObject.SetTextVariable("TARGET_SETTLEMENT", this._targetSettlement.EncyclopediaLinkWithName);
					return textObject;
				}
			}

			// Token: 0x17000E31 RID: 3633
			// (get) Token: 0x0600484F RID: 18511 RVA: 0x0014F94C File Offset: 0x0014DB4C
			public override TextObject IssueAlternativeSolutionExplanationByIssueGiver
			{
				get
				{
					TextObject textObject = new TextObject("{=Gzx35bRY}If you aren't going towards {TARGET_SETTLEMENT}, maybe you could have some of your men take my goods and bring back the profit? It shouldn't take more than {ALTERNATIVE_SOLUTION_MEN_AMOUNT} men and one of your trusted lieutenants with decent grasp of trade. They can go and be back in about {RETURN_DAYS} days.[if:convo_annoyed]", null);
					textObject.SetTextVariable("TARGET_SETTLEMENT", this._targetSettlement.EncyclopediaLinkWithName);
					textObject.SetTextVariable("ALTERNATIVE_SOLUTION_MEN_AMOUNT", base.GetTotalAlternativeSolutionNeededMenCount());
					textObject.SetTextVariable("RETURN_DAYS", base.GetTotalAlternativeSolutionDurationInDays());
					return textObject;
				}
			}

			// Token: 0x17000E32 RID: 3634
			// (get) Token: 0x06004850 RID: 18512 RVA: 0x0014F9A0 File Offset: 0x0014DBA0
			public override TextObject IssueLordSolutionExplanationByIssueGiver
			{
				get
				{
					TextObject textObject = new TextObject("{=tgj9BuCL}You could change this law, my {?PLAYER.GENDER}lady{?}lord{\\?}. All of us would be grateful. and we're willing to donate {REWARD}{GOLD_ICON} to show our thanks...", null);
					StringHelpers.SetCharacterProperties("PLAYER", CharacterObject.PlayerCharacter, textObject, false);
					textObject.SetTextVariable("GOLD_ICON", "{=!}<img src=\"General\\Icons\\Coin@2x\" extend=\"8\">");
					textObject.SetTextVariable("REWARD", this.RewardGold);
					return textObject;
				}
			}

			// Token: 0x17000E33 RID: 3635
			// (get) Token: 0x06004851 RID: 18513 RVA: 0x0014F9EF File Offset: 0x0014DBEF
			public override TextObject IssueLordSolutionAcceptByPlayer
			{
				get
				{
					return new TextObject("{=azHy8uwl}I will issue a decree to remove the restrictions on the sale of goods.", null);
				}
			}

			// Token: 0x17000E34 RID: 3636
			// (get) Token: 0x06004852 RID: 18514 RVA: 0x0014F9FC File Offset: 0x0014DBFC
			public override TextObject IssueLordSolutionResponseByIssueGiver
			{
				get
				{
					return new TextObject("{=hAyFpmxq}My {?PLAYER.GENDER}lady{?}lord{\\?}, that would be very good. The merchants won't like it but hard-working artisans like me will be grateful to you.", null);
				}
			}

			// Token: 0x17000E35 RID: 3637
			// (get) Token: 0x06004853 RID: 18515 RVA: 0x0014FA09 File Offset: 0x0014DC09
			public override TextObject IssueLordSolutionCounterOfferExplanationByOtherNpc
			{
				get
				{
					return new TextObject("{=nbeCbTH6}My {?PLAYER.GENDER}lady{?}lord{\\?}, we heard that you wish to issue a decree permitting artisans to behave like merchants. This will undo an arrangement here that's worked for generations. Please reconsider this.", null);
				}
			}

			// Token: 0x17000E36 RID: 3638
			// (get) Token: 0x06004854 RID: 18516 RVA: 0x0014FA16 File Offset: 0x0014DC16
			public override TextObject IssueLordSolutionCounterOfferBriefByOtherNpc
			{
				get
				{
					return new TextObject("{=KSeIOHDh}(One of the merchants in the town comes to talk as you are preparing to depart.)", null);
				}
			}

			// Token: 0x17000E37 RID: 3639
			// (get) Token: 0x06004855 RID: 18517 RVA: 0x0014FA23 File Offset: 0x0014DC23
			public override TextObject IssueLordSolutionCounterOfferAcceptByPlayer
			{
				get
				{
					return new TextObject("{=dpFFo2U2}I understand. I'll hold off on the decree, then.", null);
				}
			}

			// Token: 0x17000E38 RID: 3640
			// (get) Token: 0x06004856 RID: 18518 RVA: 0x0014FA30 File Offset: 0x0014DC30
			public override TextObject IssueLordSolutionCounterOfferAcceptResponseByOtherNpc
			{
				get
				{
					return new TextObject("{=6ZTNuF30}That's the right call. Thank you for listening to the voice of reason.", null);
				}
			}

			// Token: 0x17000E39 RID: 3641
			// (get) Token: 0x06004857 RID: 18519 RVA: 0x0014FA3D File Offset: 0x0014DC3D
			public override TextObject IssueLordSolutionCounterOfferDeclineByPlayer
			{
				get
				{
					return new TextObject("{=K1J6Xqht}Sorry, I have to do it.", null);
				}
			}

			// Token: 0x17000E3A RID: 3642
			// (get) Token: 0x06004858 RID: 18520 RVA: 0x0014FA4A File Offset: 0x0014DC4A
			public override TextObject IssueLordSolutionCounterOfferDeclineResponseByOtherNpc
			{
				get
				{
					return new TextObject("{=YjsRb88D}That's your right, my {?PLAYER.GENDER}lady{?}lord{\\?}. But if you can't get the support of the merchants here when you next need it, well, don't say no one said anything.", null);
				}
			}

			// Token: 0x17000E3B RID: 3643
			// (get) Token: 0x06004859 RID: 18521 RVA: 0x0014FA57 File Offset: 0x0014DC57
			protected override TextObject LordSolutionStartLog
			{
				get
				{
					return new TextObject("{=FT9V47bd}You issued a decree to remove the restrictions on the sale of goods, as the artisans had requested.", null);
				}
			}

			// Token: 0x17000E3C RID: 3644
			// (get) Token: 0x0600485A RID: 18522 RVA: 0x0014FA64 File Offset: 0x0014DC64
			protected override TextObject LordSolutionCounterOfferAcceptLog
			{
				get
				{
					TextObject textObject = new TextObject("{=SpIn5pr4}After listening to the town merchants, you decided to keep the restrictions on the sale of goods. Your decision made the merchants happy but disappointed the {QUEST_GIVER.LINK}.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.IssueOwner.CharacterObject, textObject, false);
					return textObject;
				}
			}

			// Token: 0x17000E3D RID: 3645
			// (get) Token: 0x0600485B RID: 18523 RVA: 0x0014FA98 File Offset: 0x0014DC98
			public override TextObject IssueQuestSolutionAcceptByPlayer
			{
				get
				{
					TextObject textObject = new TextObject("{=ueUsg9OL}I can take your goods to {TARGET_HERO.LINK} in {TARGET_SETTLEMENT} myself.", null);
					textObject.SetTextVariable("TARGET_SETTLEMENT", this._targetSettlement.EncyclopediaLinkWithName);
					StringHelpers.SetCharacterProperties("TARGET_HERO", this._targetHero.CharacterObject, textObject, false);
					return textObject;
				}
			}

			// Token: 0x17000E3E RID: 3646
			// (get) Token: 0x0600485C RID: 18524 RVA: 0x0014FAE1 File Offset: 0x0014DCE1
			public override TextObject Title
			{
				get
				{
					TextObject textObject = new TextObject("{=qfClYYjK}Artisans can't sell their products in {ISSUE_GIVER_SETTLEMENT}", null);
					textObject.SetTextVariable("ISSUE_GIVER_SETTLEMENT", base.IssueSettlement.Name);
					return textObject;
				}
			}

			// Token: 0x17000E3F RID: 3647
			// (get) Token: 0x0600485D RID: 18525 RVA: 0x0014FB05 File Offset: 0x0014DD05
			public override TextObject Description
			{
				get
				{
					TextObject textObject = new TextObject("{=3KpgHPlo}The laws of {ISSUE_GIVER_SETTLEMENT} dictate that artisans sell their goods at a fixed rate to the merchants in town. And now they complain the price set by the merchants is not fair.", null);
					textObject.SetTextVariable("ISSUE_GIVER_SETTLEMENT", base.IssueOwner.CurrentSettlement.Name);
					return textObject;
				}
			}

			// Token: 0x17000E40 RID: 3648
			// (get) Token: 0x0600485E RID: 18526 RVA: 0x0014FB30 File Offset: 0x0014DD30
			public override TextObject IssueAsRumorInSettlement
			{
				get
				{
					TextObject textObject = new TextObject("{=TuIyqMWG}The artisans and the merchants are at each other's throats right now. I bet {QUEST_GIVER.NAME} is planning something.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.IssueOwner.CharacterObject, textObject, false);
					return textObject;
				}
			}

			// Token: 0x17000E41 RID: 3649
			// (get) Token: 0x0600485F RID: 18527 RVA: 0x0014FB62 File Offset: 0x0014DD62
			public override TextObject IssueAlternativeSolutionAcceptByPlayer
			{
				get
				{
					TextObject textObject = new TextObject("{=srbMyPXl}You can have one of my companions and {REQUIRED_TROOP_AMOUNT} of my men to take your goods to {TARGET_TOWN}", null);
					textObject.SetTextVariable("REQUIRED_TROOP_AMOUNT", base.GetTotalAlternativeSolutionNeededMenCount());
					textObject.SetTextVariable("TARGET_TOWN", this._targetSettlement.EncyclopediaLinkWithName);
					return textObject;
				}
			}

			// Token: 0x17000E42 RID: 3650
			// (get) Token: 0x06004860 RID: 18528 RVA: 0x0014FB98 File Offset: 0x0014DD98
			public override TextObject IssueDiscussAlternativeSolution
			{
				get
				{
					TextObject textObject = new TextObject("{=GE4DqFyl}I am still waiting for news from {TARGET_SETTLEMENT}. Thanks again for sparing your men.", null);
					textObject.SetTextVariable("TARGET_SETTLEMENT", this._targetSettlement.EncyclopediaLinkWithName);
					return textObject;
				}
			}

			// Token: 0x17000E43 RID: 3651
			// (get) Token: 0x06004861 RID: 18529 RVA: 0x0014FBBC File Offset: 0x0014DDBC
			public override TextObject IssueAlternativeSolutionResponseByIssueGiver
			{
				get
				{
					TextObject textObject = new TextObject("{=EnS6NwaH}Thank you my {?PLAYER.GENDER}lady{?}lord{\\?}. I am sure your men will take care of the problem.", null);
					StringHelpers.SetCharacterProperties("PLAYER", CharacterObject.PlayerCharacter, textObject, false);
					return textObject;
				}
			}

			// Token: 0x06004862 RID: 18530 RVA: 0x0014FBE8 File Offset: 0x0014DDE8
			public ArtisanCantSellProductsAtAFairPriceIssue(Hero issueOwner) : base(issueOwner, CampaignTime.DaysFromNow(30f))
			{
				this._targetSettlement = ArtisanCantSellProductsAtAFairPriceIssueBehavior.SelectTargetSettlement(issueOwner);
				this._targetHero = this._targetSettlement.Notables.GetRandomElementWithPredicate((Hero x) => x.CanHaveQuestsOrIssues());
				this._rawMaterialsToBeDelivered = Campaign.Current.ObjectManager.GetObject<ItemObject>(this._possibleDeliveryItems.GetRandomElement<string>());
				this.CounterOfferHero = ArtisanCantSellProductsAtAFairPriceIssueBehavior.SelectCounterOfferHero(issueOwner);
			}

			// Token: 0x06004863 RID: 18531 RVA: 0x0014FCCB File Offset: 0x0014DECB
			protected override float GetIssueEffectAmountInternal(IssueEffect issueEffect)
			{
				if (issueEffect == DefaultIssueEffects.SettlementProsperity)
				{
					return -0.2f;
				}
				if (issueEffect == DefaultIssueEffects.IssueOwnerPower)
				{
					return -0.2f;
				}
				return 0f;
			}

			// Token: 0x06004864 RID: 18532 RVA: 0x0014FCEE File Offset: 0x0014DEEE
			public override ValueTuple<SkillObject, int> GetAlternativeSolutionSkill(Hero hero)
			{
				return new ValueTuple<SkillObject, int>((hero.GetSkillValue(DefaultSkills.Charm) >= hero.GetSkillValue(DefaultSkills.Trade)) ? DefaultSkills.Charm : DefaultSkills.Trade, 120);
			}

			// Token: 0x06004865 RID: 18533 RVA: 0x0014FD1C File Offset: 0x0014DF1C
			protected override void LordSolutionConsequenceWithAcceptCounterOffer()
			{
				foreach (Hero hero in base.IssueOwner.CurrentSettlement.Notables)
				{
					if (hero.IsMerchant)
					{
						ChangeRelationAction.ApplyPlayerRelation(hero, (int)(2f * base.IssueDifficultyMultiplier), true, true);
					}
				}
				this.RelationshipChangeWithIssueOwner = (int)(-5f * base.IssueDifficultyMultiplier);
				TraitLevelingHelper.OnIssueSolvedThroughBetrayal(base.IssueOwner, new Tuple<TraitObject, int>[]
				{
					new Tuple<TraitObject, int>(DefaultTraits.Honor, MathF.Round(-50f * base.IssueDifficultyMultiplier))
				});
				this.ApplyFailureEffects();
			}

			// Token: 0x06004866 RID: 18534 RVA: 0x0014FDD8 File Offset: 0x0014DFD8
			protected override void LordSolutionConsequenceWithRefuseCounterOffer()
			{
				this.ApplyLordSolutionSuccessRewards();
			}

			// Token: 0x06004867 RID: 18535 RVA: 0x0014FDE0 File Offset: 0x0014DFE0
			public override bool LordSolutionCondition(out TextObject explanation)
			{
				if (base.IssueOwner.CurrentSettlement.OwnerClan == Clan.PlayerClan)
				{
					explanation = TextObject.Empty;
					return true;
				}
				explanation = new TextObject("{=9y0zpKUF}You need to be the owner of this settlement!", null);
				return false;
			}

			// Token: 0x06004868 RID: 18536 RVA: 0x0014FE10 File Offset: 0x0014E010
			public override bool AlternativeSolutionCondition(out TextObject explanation)
			{
				explanation = TextObject.Empty;
				return QuestHelper.CheckRosterForAlternativeSolution(MobileParty.MainParty.MemberRoster, base.GetTotalAlternativeSolutionNeededMenCount(), ref explanation, 0, false);
			}

			// Token: 0x06004869 RID: 18537 RVA: 0x0014FE31 File Offset: 0x0014E031
			public override bool DoTroopsSatisfyAlternativeSolution(TroopRoster troopRoster, out TextObject explanation)
			{
				explanation = TextObject.Empty;
				return QuestHelper.CheckRosterForAlternativeSolution(troopRoster, base.GetTotalAlternativeSolutionNeededMenCount(), ref explanation, 0, false);
			}

			// Token: 0x0600486A RID: 18538 RVA: 0x0014FE49 File Offset: 0x0014E049
			protected override void AlternativeSolutionEndWithSuccessConsequence()
			{
				this.ApplySuccessRewards();
			}

			// Token: 0x0600486B RID: 18539 RVA: 0x0014FE54 File Offset: 0x0014E054
			private void ApplySuccessRewards()
			{
				base.IssueOwner.AddPower(10f);
				this.RelationshipChangeWithIssueOwner = 5;
				foreach (Hero hero in from x in base.IssueOwner.CurrentSettlement.Notables
				where x.IsMerchant
				select x)
				{
					hero.AddPower((float)((int)(-10f * base.IssueDifficultyMultiplier)));
					ChangeRelationAction.ApplyPlayerRelation(hero, -10, true, true);
				}
				base.IssueOwner.CurrentSettlement.Town.Prosperity += 30f;
			}

			// Token: 0x0600486C RID: 18540 RVA: 0x0014FF1C File Offset: 0x0014E11C
			private void ApplyLordSolutionSuccessRewards()
			{
				base.IssueOwner.AddPower(10f);
				this.RelationshipChangeWithIssueOwner = 10;
				this.CounterOfferHero.AddPower(-10f);
				foreach (Hero hero in base.IssueOwner.CurrentSettlement.Notables)
				{
					if (hero.IsMerchant)
					{
						if (hero != this.CounterOfferHero)
						{
							ChangeRelationAction.ApplyPlayerRelation(hero, -5, true, true);
						}
						else
						{
							ChangeRelationAction.ApplyPlayerRelation(hero, -10, true, true);
						}
					}
				}
				base.IssueOwner.CurrentSettlement.Town.Prosperity += 3f;
			}

			// Token: 0x0600486D RID: 18541 RVA: 0x0014FFE4 File Offset: 0x0014E1E4
			private void ApplyFailureEffects()
			{
				base.IssueOwner.AddPower(-10f);
				foreach (Hero hero in from x in base.IssueOwner.CurrentSettlement.Notables
				where x.IsMerchant
				select x)
				{
					hero.AddPower(3f);
				}
				base.IssueOwner.CurrentSettlement.Town.Prosperity -= 20f;
			}

			// Token: 0x0600486E RID: 18542 RVA: 0x00150094 File Offset: 0x0014E294
			protected override void OnGameLoad()
			{
			}

			// Token: 0x0600486F RID: 18543 RVA: 0x00150096 File Offset: 0x0014E296
			protected override void HourlyTick()
			{
			}

			// Token: 0x06004870 RID: 18544 RVA: 0x00150098 File Offset: 0x0014E298
			protected override QuestBase GenerateIssueQuest(string questId)
			{
				return new ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest(questId, base.IssueOwner, CampaignTime.DaysFromNow(18f), this._targetSettlement, this._rawMaterialsToBeDelivered, this.RawMaterialCountToBeDelivered, this.RewardGold, this._targetHero, this.CounterOfferHero);
			}

			// Token: 0x06004871 RID: 18545 RVA: 0x001500DF File Offset: 0x0014E2DF
			public override IssueBase.IssueFrequency GetFrequency()
			{
				return IssueBase.IssueFrequency.Common;
			}

			// Token: 0x06004872 RID: 18546 RVA: 0x001500E2 File Offset: 0x0014E2E2
			protected override bool CanPlayerTakeQuestConditions(Hero issueGiver, out IssueBase.PreconditionFlags flags, out Hero relationHero, out SkillObject skill)
			{
				relationHero = null;
				flags = IssueBase.PreconditionFlags.None;
				if (issueGiver.GetRelationWithPlayer() < -10f)
				{
					flags |= IssueBase.PreconditionFlags.Relation;
					relationHero = issueGiver;
				}
				relationHero = issueGiver;
				skill = null;
				return flags == IssueBase.PreconditionFlags.None;
			}

			// Token: 0x06004873 RID: 18547 RVA: 0x0015010C File Offset: 0x0014E30C
			public override bool IssueStayAliveConditions()
			{
				return this.CounterOfferHero != null && this._targetHero.IsActive && this.CounterOfferHero.IsActive && this.CounterOfferHero.CurrentSettlement == base.IssueSettlement;
			}

			// Token: 0x06004874 RID: 18548 RVA: 0x00150145 File Offset: 0x0014E345
			protected override void CompleteIssueWithTimedOutConsequences()
			{
			}

			// Token: 0x040018C6 RID: 6342
			private const int BaseRewardGold = 500;

			// Token: 0x040018C7 RID: 6343
			private const int IssueDuration = 30;

			// Token: 0x040018C8 RID: 6344
			private const int QuestTimeLimit = 18;

			// Token: 0x040018C9 RID: 6345
			private const int RequiredSkillLevelForCompanion = 120;

			// Token: 0x040018CA RID: 6346
			[CachedData]
			private readonly MBList<string> _possibleDeliveryItems = new MBList<string>
			{
				"olives",
				"clay",
				"flax",
				"grape",
				"wool",
				"hardwood",
				"hides"
			};

			// Token: 0x040018CB RID: 6347
			[SaveableField(10)]
			private ItemObject _rawMaterialsToBeDelivered;

			// Token: 0x040018CC RID: 6348
			[SaveableField(20)]
			private Settlement _targetSettlement;

			// Token: 0x040018CE RID: 6350
			[SaveableField(40)]
			private Hero _targetHero;
		}

		// Token: 0x020005FF RID: 1535
		public class ArtisanCantSellProductsAtAFairPriceIssueQuest : QuestBase
		{
			// Token: 0x06004875 RID: 18549 RVA: 0x00150147 File Offset: 0x0014E347
			internal static void AutoGeneratedStaticCollectObjectsArtisanCantSellProductsAtAFairPriceIssueQuest(object o, List<object> collectedObjects)
			{
				((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
			}

			// Token: 0x06004876 RID: 18550 RVA: 0x00150158 File Offset: 0x0014E358
			protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
			{
				base.AutoGeneratedInstanceCollectObjects(collectedObjects);
				collectedObjects.Add(this._rawMaterialsToBeDelivered);
				collectedObjects.Add(this._targetSettlement);
				collectedObjects.Add(this._counterOfferHero);
				collectedObjects.Add(this._targetHero);
				collectedObjects.Add(this._playerStartsQuestLog);
			}

			// Token: 0x06004877 RID: 18551 RVA: 0x001501A8 File Offset: 0x0014E3A8
			internal static object AutoGeneratedGetMemberValue_rawMaterialsToBeDelivered(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._rawMaterialsToBeDelivered;
			}

			// Token: 0x06004878 RID: 18552 RVA: 0x001501B5 File Offset: 0x0014E3B5
			internal static object AutoGeneratedGetMemberValue_amountOfRawGoodsToBeDelivered(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._amountOfRawGoodsToBeDelivered;
			}

			// Token: 0x06004879 RID: 18553 RVA: 0x001501C7 File Offset: 0x0014E3C7
			internal static object AutoGeneratedGetMemberValue_targetSettlement(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._targetSettlement;
			}

			// Token: 0x0600487A RID: 18554 RVA: 0x001501D4 File Offset: 0x0014E3D4
			internal static object AutoGeneratedGetMemberValue_deliveredRawGoods(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._deliveredRawGoods;
			}

			// Token: 0x0600487B RID: 18555 RVA: 0x001501E6 File Offset: 0x0014E3E6
			internal static object AutoGeneratedGetMemberValue_counterOfferHero(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._counterOfferHero;
			}

			// Token: 0x0600487C RID: 18556 RVA: 0x001501F3 File Offset: 0x0014E3F3
			internal static object AutoGeneratedGetMemberValue_targetHero(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._targetHero;
			}

			// Token: 0x0600487D RID: 18557 RVA: 0x00150200 File Offset: 0x0014E400
			internal static object AutoGeneratedGetMemberValue_counterOfferGiven(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._counterOfferGiven;
			}

			// Token: 0x0600487E RID: 18558 RVA: 0x00150212 File Offset: 0x0014E412
			internal static object AutoGeneratedGetMemberValue_counterOfferRefused(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._counterOfferRefused;
			}

			// Token: 0x0600487F RID: 18559 RVA: 0x00150224 File Offset: 0x0014E424
			internal static object AutoGeneratedGetMemberValue_rewardGold(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._rewardGold;
			}

			// Token: 0x06004880 RID: 18560 RVA: 0x00150236 File Offset: 0x0014E436
			internal static object AutoGeneratedGetMemberValue_playerStartsQuestLog(object o)
			{
				return ((ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest)o)._playerStartsQuestLog;
			}

			// Token: 0x17000E44 RID: 3652
			// (get) Token: 0x06004881 RID: 18561 RVA: 0x00150243 File Offset: 0x0014E443
			public override bool IsRemainingTimeHidden
			{
				get
				{
					return false;
				}
			}

			// Token: 0x17000E45 RID: 3653
			// (get) Token: 0x06004882 RID: 18562 RVA: 0x00150246 File Offset: 0x0014E446
			public override TextObject Title
			{
				get
				{
					return new TextObject("{=sfW7oT9e}Artisan can't sell products", null);
				}
			}

			// Token: 0x17000E46 RID: 3654
			// (get) Token: 0x06004883 RID: 18563 RVA: 0x00150254 File Offset: 0x0014E454
			private TextObject _playerStartsQuestLogText
			{
				get
				{
					TextObject textObject = new TextObject("{=N0E8gd5H}{QUEST_GIVER.LINK} an artisan from {QUEST_GIVER_SETTLEMENT} has complained to you about not being able to sell their goods at the price they want because of the unfair local laws. {?QUEST_GIVER.GENDER}She{?}He{\\?} will pay {REWARD_AMOUNT}{GOLD_ICON} for you to take the goods to another town. You agreed to take {?QUEST_GIVER.GENDER}her{?}his{\\?} goods to {TARGET_HERO.LINK} in {TARGET_SETTLEMENT}.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					StringHelpers.SetCharacterProperties("TARGET_HERO", this._targetHero.CharacterObject, textObject, false);
					textObject.SetTextVariable("QUEST_GIVER_SETTLEMENT", base.QuestGiver.CurrentSettlement.Name);
					textObject.SetTextVariable("TARGET_SETTLEMENT", this._targetSettlement.EncyclopediaLinkWithName);
					textObject.SetTextVariable("REWARD_AMOUNT", this.RewardGold);
					textObject.SetTextVariable("GOLD_ICON", "{=!}<img src=\"General\\Icons\\Coin@2x\" extend=\"8\">");
					return textObject;
				}
			}

			// Token: 0x17000E47 RID: 3655
			// (get) Token: 0x06004884 RID: 18564 RVA: 0x001502F4 File Offset: 0x0014E4F4
			private TextObject _successQuestLogText
			{
				get
				{
					TextObject textObject = new TextObject("{=7fr8QDYi}{QUEST_GIVER.LINK} sends {?QUEST_GIVER.GENDER}her{?}his{\\?} regards for a fine job done with the {REWARD}{GOLD_ICON} {?QUEST_GIVER.GENDER}she{?}he{\\?} promised.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					textObject.SetTextVariable("REWARD", this._rewardGold);
					textObject.SetTextVariable("GOLD_ICON", "{=!}<img src=\"General\\Icons\\Coin@2x\" extend=\"8\">");
					return textObject;
				}
			}

			// Token: 0x17000E48 RID: 3656
			// (get) Token: 0x06004885 RID: 18565 RVA: 0x0015034C File Offset: 0x0014E54C
			private TextObject _failQuestLogText
			{
				get
				{
					TextObject textObject = new TextObject("{=um4UaneZ}You have failed to deliver {REQUESTED_AMOUNT} {.%}{?(REQUESTED_AMOUNT > 1)}{PLURAL(RAW_MATERIALS)}{?}{RAW_MATERIALS}{\\?}{.%} to {TARGET_SETTLEMENT} in time as {QUEST_GIVER.LINK} asked you.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					textObject.SetTextVariable("REMAINING_AMOUNT", this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods);
					textObject.SetTextVariable("REQUESTED_AMOUNT", this._amountOfRawGoodsToBeDelivered);
					textObject.SetTextVariable("TARGET_SETTLEMENT", this._targetSettlement.EncyclopediaLinkWithName);
					textObject.SetTextVariable("RAW_MATERIALS", this._rawMaterialsToBeDelivered.Name);
					return textObject;
				}
			}

			// Token: 0x17000E49 RID: 3657
			// (get) Token: 0x06004886 RID: 18566 RVA: 0x001503D8 File Offset: 0x0014E5D8
			private TextObject _failQuestLogCounterOfferText
			{
				get
				{
					TextObject textObject = new TextObject("{=pskiLikd}After listening to the town merchants, you decided to keep the restrictions on the sale of goods. Your decision made the merchants happy but disappointed {QUEST_GIVER.LINK}.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					return textObject;
				}
			}

			// Token: 0x17000E4A RID: 3658
			// (get) Token: 0x06004887 RID: 18567 RVA: 0x0015040C File Offset: 0x0014E60C
			private TextObject _onQuestCancelledDueToWarLogText
			{
				get
				{
					TextObject textObject = new TextObject("{=vaUlAZba}Your clan is now at war with {QUEST_GIVER.LINK}. Your agreement with {QUEST_GIVER.LINK} was canceled.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					return textObject;
				}
			}

			// Token: 0x17000E4B RID: 3659
			// (get) Token: 0x06004888 RID: 18568 RVA: 0x00150440 File Offset: 0x0014E640
			private TextObject _playerDeclaredWarQuestLogText
			{
				get
				{
					TextObject textObject = new TextObject("{=bqeWVVEE}Your actions have started a war with {QUEST_GIVER.LINK}'s faction. {?QUEST_GIVER.GENDER}She{?}He{\\?} cancels your agreement and the quest is a failure.", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					return textObject;
				}
			}

			// Token: 0x06004889 RID: 18569 RVA: 0x00150474 File Offset: 0x0014E674
			public ArtisanCantSellProductsAtAFairPriceIssueQuest(string questId, Hero questGiver, CampaignTime duration, Settlement targetSettlement, ItemObject rawGoodsToBeDelivered, int amountOfRawGoodsToBeDelivered, int rewardGold, Hero targetHero, Hero counterOfferHero) : base(questId, questGiver, duration, rewardGold)
			{
				this._targetSettlement = targetSettlement;
				this._rawMaterialsToBeDelivered = rawGoodsToBeDelivered;
				this._amountOfRawGoodsToBeDelivered = amountOfRawGoodsToBeDelivered;
				this._deliveredRawGoods = 0;
				this._counterOfferHero = counterOfferHero;
				this._targetHero = targetHero;
				this._rewardGold = rewardGold;
				this.SetDialogs();
				base.InitializeQuestOnCreation();
			}

			// Token: 0x0600488A RID: 18570 RVA: 0x001504CF File Offset: 0x0014E6CF
			protected override void InitializeQuestOnGameLoad()
			{
				this.SetDialogs();
				Campaign.Current.ConversationManager.AddDialogFlow(this.GetCounterOfferDialogFlow(), this);
				Campaign.Current.ConversationManager.AddDialogFlow(this.GetDeliveryDialogFlow(), this);
			}

			// Token: 0x0600488B RID: 18571 RVA: 0x00150503 File Offset: 0x0014E703
			protected override void HourlyTick()
			{
			}

			// Token: 0x0600488C RID: 18572 RVA: 0x00150508 File Offset: 0x0014E708
			protected override void SetDialogs()
			{
				this.OfferDialogFlow = DialogFlow.CreateDialogFlow("issue_classic_quest_start", 100).NpcLine(new TextObject("{=7KshRCtM}Excellent. I'll have the goods delivered to you right away.[if:convo_nonchalant]", null), null, null).Condition(() => Hero.OneToOneConversationHero == base.QuestGiver).Consequence(new ConversationSentence.OnConsequenceDelegate(this.QuestAcceptedConsequences)).CloseDialog();
				this.DiscussDialogFlow = DialogFlow.CreateDialogFlow("quest_discuss", 100).NpcLine(new TextObject("{=6qKJ6Uzr}I believe the goods have been delivered to you.", null), null, null).Condition(() => Hero.OneToOneConversationHero == base.QuestGiver).BeginPlayerOptions().PlayerOption(new TextObject("{=6ZCAQ1S9}Great. I will be heading out soon.", null), null).NpcLine(new TextObject("{=3SBDbPjD}Good to hear that! Safe journeys.", null), null, null).CloseDialog().PlayerOption(new TextObject("{=JOaD2BlP}In due time. Let's not be too hasty here.", null), null).NpcLine(new TextObject("{=ppi6eVos}As you wish.", null), null, null).CloseDialog().EndPlayerOptions().CloseDialog();
			}

			// Token: 0x0600488D RID: 18573 RVA: 0x001505F4 File Offset: 0x0014E7F4
			private void QuestAcceptedConsequences()
			{
				base.StartQuest();
				TextObject textObject = new TextObject("{=L700FNht}Delivered {RAW_MATERIAL}", null);
				textObject.SetTextVariable("RAW_MATERIAL", this._rawMaterialsToBeDelivered.Name);
				this._playerStartsQuestLog = base.AddDiscreteLog(this._playerStartsQuestLogText, textObject, this._deliveredRawGoods, this._amountOfRawGoodsToBeDelivered, null, true);
				PartyBase.MainParty.ItemRoster.AddToCounts(this._rawMaterialsToBeDelivered, this._amountOfRawGoodsToBeDelivered);
				base.AddTrackedObject(this._targetSettlement);
				base.AddTrackedObject(this._targetHero);
				Campaign.Current.ConversationManager.AddDialogFlow(this.GetCounterOfferDialogFlow(), this);
				Campaign.Current.ConversationManager.AddDialogFlow(this.GetDeliveryDialogFlow(), this);
			}

			// Token: 0x0600488E RID: 18574 RVA: 0x001506AB File Offset: 0x0014E8AB
			private int GetAvailableRequestedItemCountOnPlayer(ItemObject item)
			{
				return PartyBase.MainParty.ItemRoster.GetItemNumber(item);
			}

			// Token: 0x0600488F RID: 18575 RVA: 0x001506C0 File Offset: 0x0014E8C0
			private void BeforeGameMenuOpened(MenuCallbackArgs args)
			{
				if (!this._counterOfferGiven && this._counterOfferHero != null && Campaign.Current.GameMenuManager.NextLocation == null && GameStateManager.Current.ActiveState is MapState)
				{
					CampaignMapConversation.OpenConversation(new ConversationCharacterData(CharacterObject.PlayerCharacter, null, false, false, false, false, false, false), new ConversationCharacterData(this._counterOfferHero.CharacterObject, null, false, false, false, false, false, false));
					this._counterOfferGiven = true;
				}
			}

			// Token: 0x06004890 RID: 18576 RVA: 0x00150734 File Offset: 0x0014E934
			private DialogFlow GetCounterOfferDialogFlow()
			{
				if (base.QuestGiver.CurrentSettlement.Owner != Hero.MainHero)
				{
					TextObject textObject = new TextObject("{=riYecgOn}We have heard rumors that you have purchased goods from {QUEST_GIVER.NAME}. Well, our laws require that only merchants resident in the city can buy goods directly from the artisans.[if:convo_annoyed][ib:hip]", null);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					TextObject npcText = new TextObject("{=5AvvGkk4}I'm sure what you did was an honest mistake, but there are laws. Hand over the contraband to me, and this will be the end of it.", null);
					if (this._counterOfferHero.CharacterObject.GetPersona() == DefaultTraits.PersonaCurt)
					{
						npcText = new TextObject("{=PyjCZGlG}This town has laws about unauthorized trade. Turn over the goods to me now.", null);
					}
					return DialogFlow.CreateDialogFlow("start", 125).NpcLine(new TextObject("{=KSeIOHDh}(One of the merchants in the town comes to talk as you are preparing to depart.)", null), null, null).Condition(() => this._counterOfferHero == Hero.OneToOneConversationHero && !this._counterOfferRefused).NpcLine(textObject, null, null).NpcLine(npcText, null, null).BeginPlayerOptions().PlayerOption(new TextObject("{=mWLA9sfT}I don't want to break the law. You can take the goods.", null), null).NpcLine(new TextObject("{=xeboujso}That's the right call. You seem a responsible type.[if:convo_nonchalant]", null), null, null).Consequence(delegate
					{
						Campaign.Current.ConversationManager.ConversationEndOneShot += this.QuestFailedWithRefusal;
					}).CloseDialog().PlayerOption(new TextObject("{=fe0uGUZb}That's just robbery under the cover of law. I'm not giving you anything.", null), null).NpcLine(new TextObject("{=U9z7rvX5}Respectfully, you're making a big mistake and I think you're going to regret it.[if:convo_furious]", null), null, null).Consequence(delegate
					{
						Campaign.Current.ConversationManager.ConversationEndOneShot += this.RefuseCounterOfferConsequences;
					}).CloseDialog().EndPlayerOptions();
				}
				TextObject textObject2 = new TextObject("{=DidANRmb}My {?PLAYER.GENDER}lady{?}lord{\\?}, we have heard rumors that you have purchased goods from {QUEST_GIVER.NAME}.[ib:demure] Surely this cannot be true. Our laws require that only merchants resident in the city can buy goods directly from the artisans.", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject2, false);
				TextObject npcText2 = new TextObject("{=bbz2eyAO}Perhaps, my {?PLAYER.GENDER}lady{?}lord{\\?}, it was a mistake? If you were to relinquish the goods, it would avoid a situation that might appear, well, a bit unseemly.", null);
				return DialogFlow.CreateDialogFlow("start", 125).NpcLine(new TextObject("{=KSeIOHDh}(One of the merchants in the town comes to talk as you are preparing to depart.)", null), null, null).Condition(() => this._counterOfferHero == Hero.OneToOneConversationHero && !this._counterOfferRefused).NpcLine(textObject2, null, null).NpcLine(npcText2, null, null).BeginPlayerOptions().PlayerOption(new TextObject("{=EKvwhGtE}I suppose the laws of this town bind me as well. You can take the goods.", null), null).NpcLine(new TextObject("{=dSy9Hawq}A just decision, my {?PLAYER.GENDER}lady{?}lord{\\?}.", null), null, null).Consequence(delegate
				{
					Campaign.Current.ConversationManager.ConversationEndOneShot += this.QuestFailedWithRefusal;
				}).CloseDialog().PlayerOption(new TextObject("{=IUCkbHkT}I decide how the law here is applied, merchant.", null), null).NpcLine(new TextObject("{=RYOuDxdu}Respectfully, my {?PLAYER.GENDER}lady{?}lord{\\?}, I must protest this. But of course you are free to do what you will.", null), null, null).Consequence(delegate
				{
					Campaign.Current.ConversationManager.ConversationEndOneShot += this.RefuseCounterOfferConsequences;
				}).CloseDialog().EndPlayerOptions();
			}

			// Token: 0x06004891 RID: 18577 RVA: 0x00150958 File Offset: 0x0014EB58
			private DialogFlow GetDeliveryDialogFlow()
			{
				TextObject textObject = new TextObject("{=8nwZXNTk}About the task {QUEST_GIVER.LINK} gave me...", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
				TextObject textObject2 = new TextObject("{=mr7SgjAq}Yes... {QUEST_GIVER.LINK} sent word to us. We are expecting the {.%}{RAW_MATERIALS}{.%} that {?QUEST_GIVER.GENDER}she{?}he{\\?} had.", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject2, false);
				StringHelpers.SetCharacterProperties("PLAYER", CharacterObject.PlayerCharacter, textObject2, false);
				textObject2.SetTextVariable("RAW_MATERIALS", this._rawMaterialsToBeDelivered.Name);
				TextObject npcSecondLine = new TextObject("{=g7hZw8LI}Have you brought {REQUESTED_AMOUNT} {.%}{?(REQUESTED_AMOUNT > 1)}{PLURAL(RAW_MATERIALS)}{?}{RAW_MATERIALS}{\\?}{.%}? I have a fat purse of {REWARD}{GOLD_ICON} for you as promised.", null);
				npcSecondLine.SetTextVariable("GOLD_ICON", "{=!}<img src=\"General\\Icons\\Coin@2x\" extend=\"8\">");
				npcSecondLine.SetTextVariable("REWARD", this._rewardGold);
				npcSecondLine.SetTextVariable("REQUESTED_AMOUNT", this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods);
				npcSecondLine.SetTextVariable("RAW_MATERIALS", this._rawMaterialsToBeDelivered.Name);
				TextObject text = new TextObject("{=jidYZW2s}Most of the goods are here, but I lost some of them along the way. I have {AVAILABLE_AMOUNT} with me.", null);
				TextObject textObject3 = new TextObject("{=bPcO3Km2}Yes, things come up, but my agreement with {QUEST_GIVER.LINK} was for a fixed amount of goods. I don't want to negotiate a new deal. Please come back when you can get the full amount.[if:convo_nervous2][ib:closed]", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject3, false);
				TextObject playerDeliverItemsFully = new TextObject("{=yKz5e5H4}Yes. I have the goods right here. I brought {REQUESTED_AMOUNT} {.%}{?(REQUESTED_AMOUNT > 1)}{PLURAL(RAW_MATERIALS)}{?}{RAW_MATERIALS}{\\?}{.%} as we agreed.", null);
				playerDeliverItemsFully.SetTextVariable("REQUESTED_AMOUNT", this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods);
				playerDeliverItemsFully.SetTextVariable("RAW_MATERIALS", this._rawMaterialsToBeDelivered.Name);
				TextObject textObject4 = new TextObject("{=S60sDU3j}Very good! Here is your money. Thank you.[if:convo_grateful]", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject4, false);
				TextObject text2 = new TextObject("{=4uKTfTg9}Sorry. I don't have anything for you this time.", null);
				TextObject npcText = new TextObject("{=JTfaqKyX}Well, try to bring it soon.[if:convo_thinking][ib:closed]", null);
				TextObject text3 = new TextObject("{=GVJS9ewr}You know, these goods are worth more to me than what you'll paying. I will keep them.", null);
				TextObject textObject5 = new TextObject("{=kWZ3cskl}What? That's a breach of contract. {QUEST_GIVER.LINK} will certainly hear about this...[if:convo_grave][ib:aggressive]", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject5, false);
				return DialogFlow.CreateDialogFlow("hero_main_options", 125).PlayerLine(textObject, null).Condition(delegate
				{
					if (this._deliveredRawGoods > 0)
					{
						npcSecondLine.SetTextVariable("REQUESTED_AMOUNT", this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods);
						playerDeliverItemsFully.SetTextVariable("REQUESTED_AMOUNT", this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods);
					}
					return Settlement.CurrentSettlement == this._targetSettlement && CharacterObject.OneToOneConversationCharacter.IsHero && CharacterObject.OneToOneConversationCharacter.HeroObject == this._targetHero;
				}).NpcLine(textObject2, null, null).NpcLine(npcSecondLine, null, null).BeginPlayerOptions().PlayerOption(text, null).Condition(delegate
				{
					int availableRequestedItemCountOnPlayer = this.GetAvailableRequestedItemCountOnPlayer(this._rawMaterialsToBeDelivered);
					int num = this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods;
					Campaign.Current.ConversationManager.GetCurrentDialogLine().SetTextVariable("AVAILABLE_AMOUNT", availableRequestedItemCountOnPlayer);
					return availableRequestedItemCountOnPlayer < num && availableRequestedItemCountOnPlayer != 0;
				}).NpcLine(textObject3, null, null).Consequence(new ConversationSentence.OnConsequenceDelegate(this.DeliverItemsPartiallyOnConsequence)).CloseDialog().PlayerOption(playerDeliverItemsFully, null).Condition(delegate
				{
					int availableRequestedItemCountOnPlayer = this.GetAvailableRequestedItemCountOnPlayer(this._rawMaterialsToBeDelivered);
					int num = this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods;
					Campaign.Current.ConversationManager.GetCurrentDialogLine().SetTextVariable("REQUESTED_AMOUNT", this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods);
					Campaign.Current.ConversationManager.GetCurrentDialogLine().SetTextVariable("AVAILABLE_AMOUNT", num);
					return availableRequestedItemCountOnPlayer >= num && availableRequestedItemCountOnPlayer != 0;
				}).NpcLine(textObject4, null, null).Consequence(new ConversationSentence.OnConsequenceDelegate(this.DeliverItemsFullyOnConsequence)).CloseDialog().PlayerOption(text3, null).NpcLine(textObject5, null, null).Consequence(new ConversationSentence.OnConsequenceDelegate(this.DeliverItemsRejectOnConsequence)).CloseDialog().PlayerOption(text2, null).NpcLine(npcText, null, null).CloseDialog().EndPlayerOptions().CloseDialog();
			}

			// Token: 0x06004892 RID: 18578 RVA: 0x00150C44 File Offset: 0x0014EE44
			private void DeliverItemsRejectOnConsequence()
			{
				TextObject textObject = new TextObject("{=yoiOIuI9}You refused to hand over the items. {QUEST_GIVER.LINK} must be furious.", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
				this.RelationshipChangeWithQuestGiver = -20;
				base.CompleteQuestWithFail(textObject);
				ChangeRelationAction.ApplyPlayerRelation(this._targetHero, -15, true, true);
			}

			// Token: 0x06004893 RID: 18579 RVA: 0x00150C94 File Offset: 0x0014EE94
			private void DeliverItemsPartiallyOnConsequence()
			{
				int availableRequestedItemCountOnPlayer = this.GetAvailableRequestedItemCountOnPlayer(this._rawMaterialsToBeDelivered);
				this._deliveredRawGoods += availableRequestedItemCountOnPlayer;
				PartyBase.MainParty.ItemRoster.AddToCounts(this._rawMaterialsToBeDelivered, -availableRequestedItemCountOnPlayer);
				base.UpdateQuestTaskStage(this._playerStartsQuestLog, this._deliveredRawGoods);
				int variable = this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods;
				TextObject textObject = new TextObject("{=ffoqz6yP}You have delivered {DELIVERED_ITEM_COUNT} units of goods from {QUEST_GIVER.NAME}.", null);
				textObject.SetTextVariable("DELIVERED_ITEM_COUNT", availableRequestedItemCountOnPlayer);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
				MBInformationManager.AddQuickInformation(textObject, 0, null, "");
				TextObject textObject2 = new TextObject("{=3zdK4sm2}You have to bring in amount {REQUIRED_AMOUNT} more to fulfill your end of the deal.", null);
				textObject2.SetTextVariable("REQUIRED_AMOUNT", variable);
				MBInformationManager.AddQuickInformation(textObject2, 0, null, "");
			}

			// Token: 0x06004894 RID: 18580 RVA: 0x00150D58 File Offset: 0x0014EF58
			private void DeliverItemsFullyOnConsequence()
			{
				int num = this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods;
				this._deliveredRawGoods = this._amountOfRawGoodsToBeDelivered;
				PartyBase.MainParty.ItemRoster.AddToCounts(this._rawMaterialsToBeDelivered, -num);
				base.UpdateQuestTaskStage(this._playerStartsQuestLog, this._deliveredRawGoods);
				TextObject textObject = new TextObject("{=WSLHfiwg}You have delivered the goods from {QUEST_GIVER.NAME}.", null);
				StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
				MBInformationManager.AddQuickInformation(textObject, 0, null, "");
				base.CompleteQuestWithSuccess();
			}

			// Token: 0x06004895 RID: 18581 RVA: 0x00150DE0 File Offset: 0x0014EFE0
			private void QuestFailedWithRefusal()
			{
				foreach (Hero hero in from x in base.QuestGiver.CurrentSettlement.Notables
				where x.IsMerchant
				select x)
				{
					ChangeRelationAction.ApplyPlayerRelation(hero, 2, true, true);
					hero.AddPower(10f);
				}
				this.RelationshipChangeWithQuestGiver = -5;
				TraitLevelingHelper.OnIssueFailed(base.QuestGiver, new Tuple<TraitObject, int>[]
				{
					new Tuple<TraitObject, int>(DefaultTraits.Honor, -50)
				});
				base.CompleteQuestWithFail(this._failQuestLogCounterOfferText);
				this.RemoveRequestedItemsFromPlayer();
			}

			// Token: 0x06004896 RID: 18582 RVA: 0x00150EA0 File Offset: 0x0014F0A0
			private void RefuseCounterOfferConsequences()
			{
				if (base.QuestGiver.CurrentSettlement.Owner != Hero.MainHero)
				{
					ChangeCrimeRatingAction.Apply(base.QuestGiver.CurrentSettlement.MapFaction, 5f, true);
				}
				this._counterOfferHero.AddPower(-10f);
				this._counterOfferRefused = true;
			}

			// Token: 0x06004897 RID: 18583 RVA: 0x00150EF8 File Offset: 0x0014F0F8
			protected override void RegisterEvents()
			{
				CampaignEvents.BeforeGameMenuOpenedEvent.AddNonSerializedListener(this, new Action<MenuCallbackArgs>(this.BeforeGameMenuOpened));
				CampaignEvents.HeroKilledEvent.AddNonSerializedListener(this, new Action<Hero, Hero, KillCharacterAction.KillCharacterActionDetail, bool>(this.OnHeroKilled));
				CampaignEvents.OnClanChangedKingdomEvent.AddNonSerializedListener(this, new Action<Clan, Kingdom, Kingdom, ChangeKingdomAction.ChangeKingdomActionDetail, bool>(this.OnClanChangedKingdom));
				CampaignEvents.WarDeclared.AddNonSerializedListener(this, new Action<IFaction, IFaction, DeclareWarAction.DeclareWarDetail>(this.OnWarDeclared));
			}

			// Token: 0x06004898 RID: 18584 RVA: 0x00150F61 File Offset: 0x0014F161
			public override void OnHeroCanHaveQuestOrIssueInfoIsRequested(Hero hero, ref bool result)
			{
				if (hero == this._targetHero)
				{
					result = false;
				}
			}

			// Token: 0x06004899 RID: 18585 RVA: 0x00150F6F File Offset: 0x0014F16F
			private void OnClanChangedKingdom(Clan clan, Kingdom oldKingdom, Kingdom newKingdom, ChangeKingdomAction.ChangeKingdomActionDetail detail, bool showNotification = true)
			{
				if (base.QuestGiver.CurrentSettlement.MapFaction.IsAtWarWith(Hero.MainHero.MapFaction))
				{
					base.CompleteQuestWithCancel(this._onQuestCancelledDueToWarLogText);
				}
			}

			// Token: 0x0600489A RID: 18586 RVA: 0x00150F9E File Offset: 0x0014F19E
			private void OnWarDeclared(IFaction faction1, IFaction faction2, DeclareWarAction.DeclareWarDetail detail)
			{
				QuestHelper.CheckWarDeclarationAndFailOrCancelTheQuest(this, faction1, faction2, detail, this._playerDeclaredWarQuestLogText, this._onQuestCancelledDueToWarLogText, false);
			}

			// Token: 0x0600489B RID: 18587 RVA: 0x00150FB8 File Offset: 0x0014F1B8
			private void OnHeroKilled(Hero victim, Hero killer, KillCharacterAction.KillCharacterActionDetail detail, bool showNotification)
			{
				if (victim == this._targetHero)
				{
					TextObject textObject = (detail == KillCharacterAction.KillCharacterActionDetail.Lost) ? this.TargetHeroDisappearedLogText : this.TargetHeroDiedLogText;
					StringHelpers.SetCharacterProperties("QUEST_TARGET", this._targetHero.CharacterObject, textObject, false);
					StringHelpers.SetCharacterProperties("QUEST_GIVER", base.QuestGiver.CharacterObject, textObject, false);
					base.AddLog(textObject, false);
					base.CompleteQuestWithCancel(null);
					return;
				}
				if (victim == this._counterOfferHero)
				{
					base.CompleteQuestWithCancel(null);
				}
			}

			// Token: 0x0600489C RID: 18588 RVA: 0x00151034 File Offset: 0x0014F234
			private void RemoveRequestedItemsFromPlayer()
			{
				int availableRequestedItemCountOnPlayer = this.GetAvailableRequestedItemCountOnPlayer(this._rawMaterialsToBeDelivered);
				int num = this._amountOfRawGoodsToBeDelivered - this._deliveredRawGoods;
				PartyBase.MainParty.ItemRoster.AddToCounts(this._rawMaterialsToBeDelivered, (availableRequestedItemCountOnPlayer < num) ? (-availableRequestedItemCountOnPlayer) : (-num));
			}

			// Token: 0x0600489D RID: 18589 RVA: 0x0015107C File Offset: 0x0014F27C
			public override void OnFailed()
			{
				base.QuestGiver.AddPower(-10f);
				base.QuestGiver.CurrentSettlement.Town.Prosperity -= 20f;
				foreach (Hero hero in from x in base.QuestGiver.CurrentSettlement.Notables
				where x.IsMerchant
				select x)
				{
					hero.AddPower(5f);
				}
			}

			// Token: 0x0600489E RID: 18590 RVA: 0x0015112C File Offset: 0x0014F32C
			protected override void OnFinalize()
			{
			}

			// Token: 0x0600489F RID: 18591 RVA: 0x0015112E File Offset: 0x0014F32E
			protected override void AfterLoad()
			{
			}

			// Token: 0x060048A0 RID: 18592 RVA: 0x00151130 File Offset: 0x0014F330
			protected override void OnCompleteWithSuccess()
			{
				base.QuestGiver.AddPower(15f);
				this.RelationshipChangeWithQuestGiver = 10;
				TraitLevelingHelper.OnIssueSolvedThroughQuest(base.QuestGiver, new Tuple<TraitObject, int>[]
				{
					new Tuple<TraitObject, int>(DefaultTraits.Honor, 50)
				});
				foreach (Hero hero in from x in base.QuestGiver.CurrentSettlement.Notables
				where x.IsMerchant
				select x)
				{
					hero.AddPower(-5f);
					ChangeRelationAction.ApplyPlayerRelation(hero, -5, true, true);
				}
				base.QuestGiver.CurrentSettlement.Town.Prosperity += 20f;
				base.AddLog(this._successQuestLogText, false);
				base.RemoveTrackedObject(this._targetSettlement);
				base.RemoveTrackedObject(this._targetHero);
				GiveGoldAction.ApplyBetweenCharacters(null, Hero.MainHero, this._rewardGold, false);
			}

			// Token: 0x060048A1 RID: 18593 RVA: 0x00151248 File Offset: 0x0014F448
			protected override void OnTimedOut()
			{
				this.OnFailed();
				this.RelationshipChangeWithQuestGiver = -5;
				base.AddLog(this._failQuestLogText, false);
			}

			// Token: 0x060048A2 RID: 18594 RVA: 0x00151266 File Offset: 0x0014F466
			public override void OnCanceled()
			{
			}

			// Token: 0x040018CF RID: 6351
			[SaveableField(10)]
			private readonly ItemObject _rawMaterialsToBeDelivered;

			// Token: 0x040018D0 RID: 6352
			[SaveableField(20)]
			private readonly int _amountOfRawGoodsToBeDelivered;

			// Token: 0x040018D1 RID: 6353
			[SaveableField(30)]
			private readonly Settlement _targetSettlement;

			// Token: 0x040018D2 RID: 6354
			[SaveableField(40)]
			private int _deliveredRawGoods;

			// Token: 0x040018D3 RID: 6355
			[SaveableField(100)]
			private Hero _counterOfferHero;

			// Token: 0x040018D4 RID: 6356
			[SaveableField(60)]
			private Hero _targetHero;

			// Token: 0x040018D5 RID: 6357
			[SaveableField(70)]
			private bool _counterOfferGiven;

			// Token: 0x040018D6 RID: 6358
			[SaveableField(80)]
			private bool _counterOfferRefused;

			// Token: 0x040018D7 RID: 6359
			[SaveableField(90)]
			private int _rewardGold;

			// Token: 0x040018D8 RID: 6360
			[SaveableField(212)]
			private JournalLog _playerStartsQuestLog;
		}

		// Token: 0x02000600 RID: 1536
		public class ArtisanCantSellProductsAtAFairPriceIssueTypeDefiner : SaveableTypeDefiner
		{
			// Token: 0x060048AB RID: 18603 RVA: 0x0015132E File Offset: 0x0014F52E
			public ArtisanCantSellProductsAtAFairPriceIssueTypeDefiner() : base(480000)
			{
			}

			// Token: 0x060048AC RID: 18604 RVA: 0x0015133B File Offset: 0x0014F53B
			protected override void DefineClassTypes()
			{
				base.AddClassDefinition(typeof(ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssue), 1, null);
				base.AddClassDefinition(typeof(ArtisanCantSellProductsAtAFairPriceIssueBehavior.ArtisanCantSellProductsAtAFairPriceIssueQuest), 2, null);
			}
		}
	}
}
